1. Field of the Invention
The present invention generally relates to the operation of digitally controlled electronic devices such as digital data processors, digital processor controlled “smart” devices and the like operable in a plurality of modes and, more particularly, reduction of software code overhead based on operational mode.
2. Description of the Prior Art
Portable personal computers and many other conveniences that include digital processors (e.g. processor controlled measurement devices, smart pagers, “palm-top” devices and the like) are widely available and used in many different environments. Demands for increased functionality and sophisticated graphic user interfaces have required applications programs used in such devices which can be very large. Further, it is common for a plurality of applications programs to be available concurrently on such devices.
At the present time, the cost of software can be a major portion of the cost of the device and constitute a major portion of the processor overhead, limiting performance and often greatly extending initialization time when such a device is started. Initialization procedures generally include extended testing for operational mode parameters and connected devices which may or may not be supported by the application. Results of this testing are generally stored in a configuration table that is interrogated each time particular functions of the application are run and generally result in a plurality of conditional branches to perform the function; thus consuming substantial processing time during both initialization and execution of an application program. This amount of processing time may be particularly critical when it may become necessary to re-start the processor and certainly prevents re-starting from being accomplished in real time.
Further, such overhead may not be fully consistent with desired operational environments and modes. For example, during operation of a portable personal computer on battery power, it is desirable to minimize power consumption. However, the processing overhead for maintaining availability of all software may be less desirable than extending the period of possible operation on battery power, particularly since a full complement of peripherals are much less likely to be connected when, for example, a lap-top computer is used in an environment where battery power is necessary.
Thus, it may be desirable to reduce processor overhead by limiting the amount of code decoded and/or stored for possible use. For example, code such as routines involving complex graphic user interfaces, printer drivers when no printer is connected, communications arrangements when no network access is available and the like, which are not accessed in certain operating modes (but which must be included in the applications to support the full extent of desired functionality in other operating modes and environments where, for example, power consumption is of lower importance) may be suppressed and effectively removed from the application. Conversely, when a device is connected to normal alternating current power sources, it may be desirable to disable certain power-saving features such as display blanking that may be inconvenient to a user.
At the present time, such code can exceed well in excess of 10% of the instruction stream of an application. If the application is to support many different configurations, such codes that may be desirable to disable are usually distributed in the application with an in-line granularity that makes it difficult to turn on or turn off individual operations or sections of code. Current operating systems impose the constraint of maintaining the complete code, including all possibly needed conditional branch trees (sometimes referred to as code cones) of an application for testing for operational mode parameters and identifying attached peripheral devices and then determine what functions are to be enabled. This circumstance is aggravated by the increasing number of ports which may be made available for connection of peripheral devices.
Due to the nature of the start-up code a large processing overhead and power drain may be imposed when an application is started when only small sections of code or single operations (opcodes) may require suppression, although the number of opcodes and small sections of code to be suppressed may be very numerous. Therefore, even configuring the system to limit power consumption imposes a significant power requirement. More specifically, at start-up, processors need to determine which functions are supported or have been changed. Usually, the processor follows a series of branch trees to test either memory locations or device status bits and then allow a section of code to be executed or skipped during the current power-on machine cycles depending on the results of the tests. Each time the code enters a turned-off domain, re-running of a test may be required and the code branched around at the cost of execution time and power.
Moreover, the amount of time required for this processing is significant and real-time re-starting of digital processors is not currently possible. Reduction of re-start time has generally been approached by limiting the amount of testing performed on the processor and associated memory and thus may not ensure reliable operation. Nevertheless, many applications have been identified such as machine or vehicle control where re-start time may be extremely critical.